import {
  menuList,
  menuListRes,
  userDepartmentRes,
  userInfoRes,
  userListRes,
  userRoleRes,
  userRouteRes,
  userTreeList,
} from "./mockData/user";
import { MockParams } from "./typing";

const userMock: MockParams[] = [
  {
    url: "/captchaImage",
    response: () => {
      const res = {
        msg: "操作成功",
        img: "/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAA8AKADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtrW1ga1hZoIySikkoOeKsCztv+feL/vgU2z/484P+ua/yqyKiMY8q0IjGPKtCIWdr/wA+0P8A3wKeLK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f5lKCWpyfjPSk1bT3tp0LRtzxwQfUVxvgjVtG0bxCvh1Y7qKZ5CN02Nu/HAHPftx6etev3tms0ZGKwLXR4oNTN0ttEJzwZQg3EemetTRxCjTlSqXcXsk7Lm6NrW4Na3R2EIGwYqYVXtgRGM1ZFchQ4VV1f/kCX/wD17Sf+gmrYqrq//IEv/wDr2k/9BNTL4WTL4WclZf8AHlb/APXNf5VZFczFrVzFEkapEQihRkHt+NSf2/df884f++T/AI1lGtGyM41Y2R0opwFcz/wkN3/zzg/75P8AjS/8JFd/884P++T/AI1Xtoj9tE6VolcciohYxbs7RWB/wkl5/wA8oP8Avk/40v8Awkt5/wA8oP8Avk/40e2iHtonURRKgwBU4rkf+Envf+eVv/3y3+NL/wAJRe/88rf/AL5b/Gj20Q9tE68DNL5antXIf8JVff8APK3/AO+W/wAaX/hK77/nlbf98t/jR7aIe2ideIV9BUixqO1cb/wlt/8A88bb/vlv8aX/AIS/UP8Anjbf98t/8VR7aIe2idsFHpTwK4f/AITDUP8Anja/98t/8VS/8JlqP/PG1/75b/4qj20Q9tE7naCKaIFznFcT/wAJnqP/ADxtf++G/wDiqX/hNdS/54Wn/fDf/FUe2iHtoneKuBUgrgP+E21L/nhaf98N/wDFUv8AwnGp/wDPC0/74b/4qj20Q9tE9BFVdX/5Aeof9e0n/oJriv8AhOdT/wCeFp/3w3/xVR3PjPUbq1mt3htQkqMjFVbIBGOPmqZVo2YpVY2Z/9k=",
        code: 200,
        captchaEnabled: true,
        uuid: "5489b4d6a8f24ac0a81168b505adacbb",
      };
      return res;
    },
  },
  {
    url: "/login",
    type: "post",
    response: () => {
      const res = {
        code: 200,
        data: {
          access_token: "d4dc6673-ec62-4193-93d5-4fe63d858be5",
        },
        msg: "成功1232",
      };
      return res;
    },
  },
  {
    url: "/logout",
    type: "post",
    response: () => {
      return {
        msg: "操作成功",
        code: 200,
      };
    },
  },
  {
    url: "/getInfo",
    response: () => {
      return userInfoRes;
    },
  },
  {
    url: "/getRouters",
    response: () => {
      const res = userRouteRes;
      return res;
    },
  },
  {
    url: "/auth/buttons",
    response: () => {
      return {
        code: 200,
        msg: "成功",
        data: {
          useProTable: ["add", "batchAdd", "export", "batchDelete", "status"],
          authButton: ["add", "edit", "delete", "import", "export"],
        },
      };
    },
  },
  // {
  //   url: "/menu/list",
  //   response: () => {
  //     let res = menuListRes;
  //     return res;
  //   },
  // },
  {
    url: "/user/list",
    type: "post",
    response: () => {
      let res = userListRes;
      return res;
    },
  },
  {
    url: "/user/department",
    response: () => {
      const res = userDepartmentRes;
      return res;
    },
  },
  {
    url: "/user/gender",
    response: () => {
      return {
        code: 200,
        data: [
          {
            genderLabel: "全部",
            genderValue: 3,
          },
          {
            genderLabel: "男",
            genderValue: 1,
          },
          {
            genderLabel: "女",
            genderValue: 2,
          },
        ],
        msg: "成功",
      };
    },
  },
  {
    url: "/user/status",
    response: e => {
      return {
        code: 200,
        data: [
          {
            userLabel: "启用",
            userStatus: 1,
          },
          {
            userLabel: "禁用",
            userStatus: 0,
          },
        ],
        msg: "成功",
      };
    },
  },
  {
    url: "/user/role",
    response: e => {
      const res = userRoleRes;
      return res;
    },
  },
  {
    url: "/user/tree/list",
    type: "post",
    response: e => {
      const res = userTreeList;
      return res;
    },
  },
  {
    url: "/user/menuList",
    type: "get",
    response: () => {
      return menuList;
    },
  },
];

export default userMock;
